<?php
/**     Generate list of installed modules and the i18n tables
 *
 *
 */
namespace Yz\modules\Install;
use Yz_Array,
    Yz_Hash;
class Controller_Default
    extends \Yz_Controller_Templated
{

    /** always use the default layout
     *
     */
    protected $layoutName = 'Default';

    /**
     *
     */
    public function doGet(Yz_Array $args)
    {
        return $this->output();
    }

    /**
     *
     */
    public function doPost(Yz_Array $args, Yz_Hash $post)
    {
        $this->doInstall();
        return $this->output();
    }


    /**
     *
     *
     */
    protected function doInstall()
    {
        $mod = \Yz::selectModule('Modules');
        $modList = $mod->selectModel('CreateList');
        $modList->updateModulesList();
        return $this;
    }

}
